/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.rational.sheet.table.row;

import java.awt.Component;
import javax.swing.JList;
import javax.swing.JTable;
import javax.swing.ListCellRenderer;

/**
 *
 * @author Overmind
 */
public class RowHeaderRenderer
    implements ListCellRenderer
{
    private JTable table;
	    
    public RowHeaderRenderer(JTable table)
    {
	this.table = table;
    }
    
    @Override
    public Component getListCellRendererComponent(JList list, Object value,
	    int index,
	    boolean isSelected, boolean cellHasFocus)
    {
	return table.getTableHeader().getDefaultRenderer().getTableCellRendererComponent(
		table, value, isSelected, isSelected, index, -1);
    }
}
